package com.fhz.mvvm.ui.login;

import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;

import com.fhz.mvvm.callback.ApiResponse;
import com.fhz.mvvm.entity.HUser;

import javax.inject.Inject;

import dagger.hilt.android.lifecycle.HiltViewModel;
import retrofit2.http.Body;

/**
 * 时间:2023/8/21
 *
 * @author Mr.Feng
 * 简述:
 */
@HiltViewModel
public class LoginViewModel extends ViewModel {

    MutableLiveData<LoginState> mLoginStateMutableLiveData = new MutableLiveData<LoginState>();

    @Inject
    LoginRepository mLoginRepository;

    @Inject
    public LoginViewModel() {
    }


    public LiveData<ApiResponse<HUser>> register(@Body HUser hUser){
        return mLoginRepository.register(hUser);
    }

}
